package request

import (
	"github.com/go-playground/validator/v10"
)

type UserLoginReq struct {
	Tel  string `form:"tel" binding:"required,bookableDate"`
	Code string `form:"code" binding:"required"`
}
type SendSmsReq struct {
	Tel string `form:"tel" binding:"required,bookableDate"`
}

var BookableDate validator.Func = func(fl validator.FieldLevel) bool {
	date, ok := fl.Field().Interface().(string)
	if ok {
		if len(date) != 11 {
			return false
		}
	}
	return true
}
